#ifndef _PWM_H_
#define _PWM_H_

//PWMCON
#define PWMIE(N)			(N<<7)
#define PWMTOG(N)			(N<<6)

#define CKS_SYS				(0<<0)
#define CKS_IL				(1<<0)
#define CKS_IH				(2<<0)
#define CKS_TKRC			(3<<0)

//PWMPS

#define PWM_P00_INDEX   	0 
#define PWM_P01_INDEX   	1 
#define PWM_P02_INDEX   	2 
#define PWM_P03_INDEX   	3 
#define PWM_P04_INDEX   	4 
#define PWM_P05_INDEX   	5 
#define PWM_P06_INDEX   	6 
#define PWM_P07_INDEX   	7 
#define PWM_P10_INDEX   	8
#define PWM_P11_INDEX   	9
#define PWM_P12_INDEX   	10
#define PWM_P13_INDEX   	11
#define PWM_P14_INDEX   	12
#define PWM_P15_INDEX   	13
#define PWM_P16_INDEX   	14
#define PWM_P17_INDEX   	15
#define PWM_P20_INDEX   	16
#define PWM_P30_INDEX   	17

//PWMCFG
#define TOG(N)				(N<<7)

#define PWM_CH0				0
#define PWM_CH1				1
#define PWM_CH2				2
#define PWM_CH3				3
#define PWM_CH4				4
#define PWM_CH5				5
#define PWM_CH6				6
#define PWM_CH7				7

#endif
